import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
export default new Router({
    mode: 'history',
    routes: [
    	{
            path: '/',
            name: 'Home',
            component: resolve => require(['@/components/home/Home'], resolve),
            meta: { title: '酒店首页' }
        },
        {
            path: '/message',
            name: 'messagelist',
            component: resolve => require(['@/view/message/messagelist'], resolve),
            meta: { title: '留言板' }
        },
        {
            path: '/messageDetail',
            name: 'messageDetail',
            component: resolve => require(['@/view/message/messageDetail'], resolve),
            meta: { title: '问题详情' }
        },
        {
            path: '/subUserList',
            name: 'subUserList',
            component: resolve => require(['@/view/subUser/list'], resolve),
            meta: { title: '子账号列表' }
        },
        {
            path: '/addSubUser',
            name: 'addSubUser',
            component: resolve => require(['@/view/subUser/add'], resolve),
            meta: { title: '新增子账号' }
        },
        {
            path: '/editSubUser',
            name: 'editSubUser',
            component: resolve => require(['@/view/subUser/edit'], resolve),
            meta: { title: '编辑子账号' }
        },
        {
            path: '/addSubSucc',
            name: 'addSubSucc',
            component: resolve => require(['@/view/subUser/success'], resolve),
            meta: { title: '新增子账号成功' }
        },{    
            path: '/releaseMessage',
            name: 'releaseMessage',
            component: resolve => require(['@/view/message/releaseMessage'], resolve),
            meta: { title: '发布问题' }
        },    
        {
            path: '/releaseSuccess',
            name: 'releaseSuccess',
            component: resolve => require(['@/view/message/success'], resolve),
            meta: { title: '发布成功' }
        },
        {
            path: '/feedback',
            name: 'feedback',
            component: resolve => require(['@/view/me/feedback'], resolve),
            meta: { title: '用户反馈' }
        },
        {
            path: '/feedSuccess',
            name: 'feedSuccess',
            component: resolve => require(['@/view/me/feedSuccess'], resolve),
            meta: { title: '用户反馈成功' }
        },
        {
            path: '/aboutUs',
            name: 'about',
            component: resolve => require(['@/view/me/aboutUs'], resolve),
            meta: { title: '关于我们' }
        },
        {
            path: '/service',
            name: 'service',
            component: resolve => require(['@/view/service'], resolve),
            meta: { title: '用户协议' }
        },
        {
            path: '/amendPassword',
            name: 'amendPassword',
            component: resolve => require(['@/view/me/amendPassword'], resolve),
            meta: { title: '修改密码' }
        },
        {
            path: '/amendSuccess',
            name: 'amendSuccess',
            component: resolve => require(['@/view/me/amendSuccess'], resolve),
            meta: { title: '修改密码' }
        },
        {
            path: '/notify',
            name: 'notifyList',
            component: resolve => require(['@/view/me/notify'], resolve),
            meta: { title: '消息列表' }
        },
        {
            path: '/searchResult',
            name: 'searchResult',
            component: resolve => require(['@/view/searchResult'], resolve),
            meta: { title: '搜索结果页' }
        },
        {
            path: '/videoDetail',
            name: 'videoDetail',
            component: resolve => require(['@/view/share/video'], resolve),
            meta: { title: '分享后的视频详情' }
        },
        {
            path: '/talkDetail',
            name: 'talkDetail',
            component: resolve => require(['@/view/share/talk'], resolve),
            meta: { title: '分享后的互动详情' }
        },
        {
            path: '/typeIn',
            name: 'typeIn',
            component: resolve => require(['@/view/typeIn'], resolve),
            meta: { title: '录入基本信息' }
        },
        { path: '/404', component: resolve => require(['@/components/page/404.vue'], resolve) },
        { path: '*', redirect: '/404' }
    ]
})